import axios from "axios";
//获取文章列表
let list = (params)=>axios.get('/article/list',{params});
//获取评论列表
let say = (params)=>axios.get('/comment/recent',{params});
//获取标签列表
let taglist = (params)=>axios.get('/tag/list',{params});
//删除文章列表
let remove = (data)=>axios.post('/article/remove',data);
//创建标签
let create = (data)=>axios.post('/tag/',data);
//编辑标签
let edit = (id,data)=>axios.put(`/tag/${id}`,data);
//删除标签
let move = (id,params)=>axios.delete(`/tag/${id}`,{params});
//回复评论
let reply = (data)=>axios.post('/comment/reply',data);
//获取所有分类
let all = (params)=>axios.get('/category/list',{params});
//获取子级分类
let son = (params)=>axios.get('/category/sub',{params});
let detail = (params)=>axios.get('/article/detail',{params});
let release = (data)=>axios.post('/article/release',data);
//编辑文章
let write = (data)=>axios.post('/article/edit',data);
//给指定文章标记标签
let tag = (data)=>axios.post('/article/tag',data);
export default{
    list,
    taglist,
    say,
    remove,
    create,
    edit,
    move,
    reply,
    all,
    son,
    detail,
    release,
    write,
    tag,
    
}
